package com.example.demo.mapper;

import com.example.demo.entity.Comment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CommentMapper extends JpaRepository<Comment, Integer>{
    @Query("select  c from t_comment c where c.aId = ?1 order by c.id desc ")
    public List<Comment> selectByAId(Integer aId);
}
